package com.luo.bbs.front.webapi.controller;


import com.example.bbs.front.service.ICollectService;
import com.luo.common.restful.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bin.cn
 * @since 2023-01-19
 */
@RestController
@RequestMapping("/collect")
public class CollectController {
    @Autowired
    private ICollectService collectService;
    /**
     * 查询用户收藏数
     */
    @GetMapping("/count")
    public JsonResult getCount(){
        Integer count = collectService.countByUser();
        return JsonResult.ok(count);
    }

}
